
#include <stdio.h>

main()
{
     int c, t;
     long lc, wc, cc;

     lc = wc = cc = 0;
     t = ' ';
     while ((c = getchar()) != EOF){
	  ++cc;
	  if (c == '\n') 
	       ++lc;
	  if ((c != ' ' && c != '\t' && c != '\n') && \
	      (t == ' ' || t == '\t' || t == '\n'))
	       wc++;
	  t = c;
     }
     printf("%ld\t%ld\t%ld\n", lc, wc, cc);
}
